package com.shsxt.crm.controller.user;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.shsxt.common.util.Result;
import com.shsxt.crm.model.YgUser;
import com.shsxt.crm.service.IUserService;

@Controller
@RequestMapping("/user")
public class UserController {
	
	@Autowired
	private IUserService userService;

	@PostMapping("/userLogin")
	@ResponseBody
	public Result userLogin(@RequestParam (defaultValue = "") String userName,
			@RequestParam (defaultValue = "") String userPwd) {
		return userService.userLogin(userName, userPwd);
	}
	
	/**
	 * 查询  客户经理
	 * @return
	 */
	@PostMapping("/queryAllCustomerManager")
	@ResponseBody
	public List<YgUser> queryAllCustomerManager () {
		return userService.queryAllCustomerManager();
	}

}
